﻿using Architecture.Api.Application.Commands.DeepProcessingCommand;
using Architecture.Domain.Services.Interface;
using Architecture.Domian.DTO;
using MediatR;

namespace Architecture.Api.Application.CommandHandlers.DeepProcessingHandler
{
    public class DeepProcessingCorporationQueryPicListCommandHandler : IRequestHandler<DeepProcessingCorporationQueryPicListCommand, List<PictureDTO>>
    {

        private readonly IDeepProcessingService _deepProcessingService;

        public DeepProcessingCorporationQueryPicListCommandHandler(IDeepProcessingService deepProcessingService)
        {
            _deepProcessingService = deepProcessingService;
        }

        public async Task<List<PictureDTO>> Handle(DeepProcessingCorporationQueryPicListCommand request, CancellationToken cancellationToken)
        {
            return await _deepProcessingService.GetCorporationPicture(request.productionLot, request.DeepProcessingCompanyId);
        }
    }
}